package gobelinmaker.server;

import com.esotericsoftware.kryo.Kryo;
import com.esotericsoftware.kryonet.EndPoint;
import gobelinmaker.data.BasicHoleData;
import gobelinmaker.data.BasicMotorHoleData;
import gobelinmaker.data.BasicWoolData;
import java.awt.Point;
import java.awt.geom.Point2D;

/**
 * Csomagok regisztrálását végző osztály.
 *
 * @author imruf84
 */
public class Network {

    /**
     * Osztályok regisztrálása.
     *
     * @param ep végpont
     */
    public static void register(EndPoint ep) {

        Kryo k = ep.getKryo();

        k.register(DiscoveryRequest.class);
        k.register(DiscoveryResponse.class);
        k.register(ConnectionRequest.class);
        k.register(ConnectionResponse.class);
        k.register(CameraImageRequest.class);
        k.register(CamerasListRequest.class);
        k.register(CamerasListResponse.class);
        k.register(MotorControlRequest.class);
        k.register(StepperMotorControlBoolean.class);
        k.register(ByteArrayPartResponse.class);
        k.register(NeedleCalibrationPointChangeRequest.class);
        k.register(NeedleCalibrationPointResponse.class);
        k.register(CameraCalibrationPointsChangeRequest.class);
        k.register(CameraCalibrationPointsResponse.class);
        k.register(DiscoveredHoleRequest.class);
        k.register(DiscoveredHoleResponse.class);
        k.register(LightControlRequest.class);
        k.register(ServerStateResponse.class);
        k.register(BasicHoleData.class);
        k.register(BasicHoleData[].class);
        k.register(BasicMotorHoleData.class);
        k.register(BasicMotorHoleData[].class);
        k.register(BasicWoolData.class);
        k.register(JobRequest.class);
        k.register(JobResponse.class);
        k.register(CameraColorAdjustmentChangeRequest.class);
        k.register(CameraColorAdjustmentResponse.class);
        k.register(StopDiscoveringHolesRequest.class);
        k.register(long[].class);
        k.register(byte[].class);
        k.register(int[].class);
        k.register(Point.class);
        k.register(Point3D.class);
        k.register(Point2D.Double.class);
        k.register(Point2D.Double[].class);
    }
}
